﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;
using FazaDemo.PL.ViewModelEntities;

namespace FazaDemo.PL.Mapping
{
    class DecCharEnumSelectItemsConvertWorker : ICharEnumSelectItemsConvertWorker
    {

        private readonly IList<DropDownCondition> _dDropDowns = new List<DropDownCondition>
        {
            new DropDownCondition {Id = 0, Name = " "},
            new DropDownCondition {Id = 1, Name = "D_Без условий"},
            new DropDownCondition {Id = 2, Name = "D_Равно (=)"},
            new DropDownCondition {Id = 3, Name = "D_Не равно (#)"},
            new DropDownCondition {Id = 4, Name = "D_Больше (>)"},
            new DropDownCondition {Id = 5, Name = "D_Меньше (<)"},
            new DropDownCondition {Id = 6, Name = "D_Не больше (<=)"},
            new DropDownCondition {Id = 7, Name = "D_Не меньше (>=)"},
            new DropDownCondition {Id = 8, Name = "D_Из перечня (... , ...)"},
            new DropDownCondition {Id = 9, Name = "D_Вне перечня (... , ...)"},
            new DropDownCondition {Id = 10, Name = "D_В диапазоне (от ... до ...)"},
            new DropDownCondition {Id = 11, Name = "D_Вне диапазона"}, 
            new DropDownCondition {Id = 1, Name = "D_Пусто"}, 
            new DropDownCondition {Id = 1, Name = "D_Не пусто"}
        };

        public IEnumerable<SelectListItem> Convert()
        {
            return new SelectList(_dDropDowns, "Id", "Name", 0);
        }
    }
}
